package com.study.samsung.Entity;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;

//商品详情
@Data
@NoArgsConstructor
public class Detail {
    private Integer sxid;//详情id
    private BigDecimal xprice;//商品价格
    private Integer yid;
    private Integer nid;
    private Integer sid;

//    以下为临时字段
    private Commoditycolor commoditycolor;
    private Commoditymemory commoditymemory;
    private Commodity commodity;


    public Detail(Integer sxid, BigDecimal xprice, Integer yid, Integer nid, Integer sid, Commoditycolor commoditycolor, Commoditymemory commoditymemory) {
        this.sxid = sxid;
        this.xprice = xprice;
        this.yid = yid;
        this.nid = nid;
        this.sid = sid;
        this.commoditycolor = commoditycolor;
        this.commoditymemory = commoditymemory;
    }

    public Detail(Integer sxid, BigDecimal xprice, Integer yid, Integer nid, Integer sid) {
        this.sxid = sxid;
        this.xprice = xprice;
        this.yid = yid;
        this.nid = nid;
        this.sid = sid;
    }

    public Detail(Integer sxid, BigDecimal xprice, Commoditycolor commoditycolor, Commoditymemory commoditymemory, Commodity commodity) {
        this.sxid = sxid;
        this.xprice = xprice;
        this.commoditycolor = commoditycolor;
        this.commoditymemory = commoditymemory;
        this.commodity = commodity;
    }

    public Detail(Integer sxid, BigDecimal xprice, Integer yid, Integer nid, Integer sid, Commoditycolor commoditycolor, Commoditymemory commoditymemory, Commodity commodity) {
        this.sxid = sxid;
        this.xprice = xprice;
        this.yid = yid;
        this.nid = nid;
        this.sid = sid;
        this.commoditycolor = commoditycolor;
        this.commoditymemory = commoditymemory;
        this.commodity = commodity;
    }
}
